home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.2 Applications 1996 May / SGI IRIX 6.2 Applications 1996 May.iso / dist / impr_dev.idb / usr / impressario / src / examples / libscan / installed.c.z / installed.c
C/C++ Source or Header  |  1996-05-06  |  1KB  |  53 lines

  1. /*
  2.  * installed.c
  3.  *
  4.  *     Print a list of the scanners installed on the system
  5.  *
  6.  *           Copyright (c)    1993 Silicon Graphics, Inc.
  7.  *            All Rights Reserved
  8.  *
  9.  *       THIS    IS UNPUBLISHED PROPRIETARY SOURCE CODE OF SGI
  10.  *
  11.  * The copyright notice above does not evidence any actual of intended
  12.  * publication of such source code, and is an unpublished work by Silicon
  13.  * Graphics, Inc. This material contains CONFIDENTIAL INFORMATION that is
  14.  * the property of Silicon Graphics, Inc. Any use, duplication or
  15.  * disclosure not specifically authorized by Silicon Graphics is strictly
  16.  * prohibited.
  17.  *
  18.  * RESTRICTED RIGHTS LEGEND:
  19.  *
  20.  * Use, duplication or disclosure by the Government is subject to
  21.  * restrictions as set forth in subdivision (c)(1)(ii) of the Rights in
  22.  * Technical Data and Computer Software clause at DFARS 52.227-7013,
  23.  * and/or in similar or successor clauses in the FAR, DOD or NASA FAR
  24.  * Supplement. Unpublished - rights reserved under the Copyright Laws of
  25.  * the United States. Contractor is SILICON GRAPHICS, INC., 2011 N.
  26.  * Shoreline Blvd., Mountain View, CA 94039-7311
  27.  */
  28.  
  29. #ident "$Revision"
  30.  
  31. #include <stdio.h>
  32. #include <scanner.h>
  33.  
  34. int
  35. main(void)
  36. {
  37.     FILE *fp;
  38.     SCANENT *ent;
  39.  
  40.     if ((fp = SCSetScanEnt()) == NULL) {
  41.     SCPerror("SCSetScanEnt");
  42.     exit(1);
  43.     }
  44.  
  45.     printf("Installed scanners:\n");
  46.     while ((ent = SCGetScanEnt(fp)) != NULL) {
  47.     printf("%s\n", ent->name);
  48.     }
  49.  
  50.     SCEndScanEnt(fp);
  51.     exit(0);
  52. }
  53.